package org.springcloud.catalina.eurekafeign.controller;

import org.springcloud.catalina.eurekafeign.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    HelloService helloService;

    @RequestMapping(value = "/hello/{name}", method = RequestMethod.POST)
    public String hello(@PathVariable("name") String name) {
        return helloService.hello(name);
    }
}
